package com.cloudschool.base.exception;


public class CloudSchoolException extends RuntimeException {

    private String errMessage;

    public CloudSchoolException() {
        super();
    }

    public CloudSchoolException(String message) {
        super(message);
        this.errMessage = message;
    }

    public String getErrMessage(){
        return errMessage;
    }

    public static void cast(String errMessage){
        throw new CloudSchoolException(errMessage);
    }
    public static void cast(CommonError commonError){
        throw new CloudSchoolException(commonError.getErrMessage());
    }
}
